import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useCounterStore = defineStore('counter', () => {
  const count = ref(0)
  const showDUIX = ref(false)
  const openAsrDUIX = ref(true)
  const wordsDUIX = ref('请介绍一下政务服务大数据')
  const centerTwoSum = ref({
    kind: 0,
    count: 0
  })
  const doubleCount = computed(() => count.value * 2)

  // 演讲稿实时数据
  const speechSumNumber = ref({
    right3: {
      consult: 3613,
      business: 3407,
      building: 344,
      order: 288
    }
  })
  function increment() {
    count.value++
  }

  return {
    speechSumNumber,
    count,
    doubleCount,
    increment,
    showDUIX,
    centerTwoSum,
    openAsrDUIX,
    wordsDUIX
  }
})
